/**
 * @Author: 九璃怀特 1599130621@qq.com
 * @Date: 2023-10-16 16:13:03
 * @LastEditors: 九璃怀特 1599130621@qq.com
 * @LastEditTime: 2023-10-17 11:06:18
 * @FilePath: \any-project\src\router\index.ts
 * @Description: 
 */
import { RouteRecordRaw, Router, RouterOptions, createRouter, createWebHashHistory } from "vue-router";

const routes:Array<RouteRecordRaw> = [
  {
    path:'',
    redirect:'/WebGPU',
  },
  {
    path:'/Home',
    name:'Home',
    meta:{ title: 'Home'},
    component:() => import('views/Home/Home.vue')
  },
  {
    path:'/PIXI',
    name:'PIXI',
    meta:{ title: 'PIXI'},
    component:() => import('views/PIXI/PIXI.vue'),
    redirect:'/PIXI/demo1',
    children:[
      {
        path:'demo1',
        name:'demo1',
        meta:{ title: 'demo1'},
        component:() => import('views/PIXI/pages/demo1.vue'),
      }
    ]
  },
  {
    path:'/WebGPU',
    name:'WebGPU',
    meta:{ title: 'WebGPU'},
    component:() => import('views/WebGPU/WebGPU.vue'),
    redirect:'/WebGPU/demo1',
    children:[
      {
        path:'demo1',
        name:'demo1',
        meta:{ title: 'demo1'},
        component:() => import('views/WebGPU/pages/demo1.vue'),
      }
    ]
  },
]

const options:RouterOptions = {
  history:createWebHashHistory(),
  routes
}

const router: Router = createRouter(options);

export default router;